import 'package:flutter/material.dart';

class UnfoldSelWidget extends StatelessWidget {
  @required
  final String image;
  @required
  final String title;
  @required
  final VoidCallback onPressed;

  const UnfoldSelWidget({Key key, this.image, this.title,this.onPressed}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final width = MediaQuery.of(context).size.width;
    return Container(
      child: InkWell(
        onTap: onPressed,
        child: Container(
          width: width * 0.26,
          height: width * 0.22,
          margin: EdgeInsets.all(10),
          padding: EdgeInsets.only(top: 20, left: 30, right: 30, bottom: 10),
          decoration: BoxDecoration(
              color: Colors.white,
              borderRadius: BorderRadius.all(Radius.circular(25)),
//          border: new Border.all(color: Color(0xffe3e8ed))
              boxShadow: [
                BoxShadow(color: Color(0xffe3e8ed),blurRadius: 5.0, spreadRadius: 2.0),
                BoxShadow(color: Color(0xffe7ebf0),blurRadius: 5.0, spreadRadius: 2.0),
                BoxShadow(color: Color(0xffebeef2),blurRadius: 5.0, spreadRadius: 2.0),
                BoxShadow(color: Color(0xffeff1f5),blurRadius: 5.0, spreadRadius: 2.0)
              ]),
          child: Column(
            children: <Widget>[
              Image.asset(
                image,
                height: width * 0.1,
                width: width * 0.09,
              ),
              Text(
                title,
                style: TextStyle(color: Color(0xff154D7C)),
              )
            ],
          ),
        ),
      ),
    );
  }
}
